package com.example.wwk.graduationpractice.Bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by wwk on 2017/4/18.
 */

public class AnswerBean implements Parcelable {
    private int ANSWERID;
    private int QUESTIONID;
    private String PUBLISHER;
    private String PUBLISHTIME;
    private String ANSWERCONTENT;

    public AnswerBean() {

    }
    public AnswerBean(int questionId, String name, String time, String content) {
        this.QUESTIONID = questionId;
        this.PUBLISHER = name;
        this.PUBLISHTIME = time;
        this.ANSWERCONTENT = content;
    }
    public AnswerBean(int AnswerId,int questionId, String name, String time, String content) {
        this.ANSWERID = AnswerId;
        this.QUESTIONID = questionId;
        this.PUBLISHER = name;
        this.PUBLISHTIME = time;
        this.ANSWERCONTENT = content;
    }

    protected AnswerBean(Parcel in) {
        ANSWERID = in.readInt();
        QUESTIONID = in.readInt();
        PUBLISHER = in.readString();
        PUBLISHTIME = in.readString();
        ANSWERCONTENT = in.readString();
    }

    public static final Creator<AnswerBean> CREATOR = new Creator<AnswerBean>() {
        @Override
        public AnswerBean createFromParcel(Parcel in) {
            return new AnswerBean(in);
        }

        @Override
        public AnswerBean[] newArray(int size) {
            return new AnswerBean[size];
        }
    };

    public long getAnswerId() {
        return ANSWERID;
    }

    public void setAnswerId(int answerId) {
        this.ANSWERID = answerId;
    }
    public long getQuestionId() {
        return QUESTIONID;
    }

    public void setQuestionId(int questionId) {
        this.QUESTIONID = questionId;
    }

    public String getName() {
        return PUBLISHER;
    }

    public String getTime() {
        return PUBLISHTIME;
    }

    public String getContent() {
        return ANSWERCONTENT;
    }

    public void setName(String name) {
        this.PUBLISHER = name;
    }

    public void setTime(String time) {
        this.PUBLISHTIME = time;
    }

    public void setContent(String content) {
        this.ANSWERCONTENT = content;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeInt(ANSWERID);
        parcel.writeInt(QUESTIONID);
        parcel.writeString(PUBLISHER);
        parcel.writeString(PUBLISHTIME);
        parcel.writeString(ANSWERCONTENT);
    }
}
